﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QModels;


[Table("AGVCarStatusModel")]
public class AGVCarStatusModel
{

	public Guid Id { get; set; }
	
	public string? CarNumber {  get; set; }
	/// <summary>
	/// 开机
	/// </summary>
	public bool IsOpen {  get; set; }
	/// <summary>
	/// 充电
	/// </summary>
	public bool ChongDian {  get; set; }
	/// <summary>
	/// 通信正常
	/// </summary>
	public bool TongXinOK {  get; set; }
	/// <summary>
	/// 故障全部
	/// </summary>
	public bool GuZhangQuanBu {  get; set; }
	/// <summary>
	/// 喂料中
	/// </summary>
	public bool WeiLiaoZhong {  get; set; }
	/// <summary>
	/// 本次喂料完成
	/// </summary>
	public bool WeiLiaoWanCheng {  get; set; }
	/// <summary>
	/// 故障左行走
	/// </summary>
	public bool GuZhangLeft {  get; set; }
	/// <summary>
	/// 故障右行走
	/// </summary>
	public bool GuZhangRight {  get; set; }

	/// <summary>
	/// 故障左喂料
	/// </summary>
	public bool GuZhangFeedLeft {  get; set; }
	/// <summary>
	/// 故障右喂料
	/// </summary>
	public bool GuZhangFeedRight { get;set; }
	/// <summary>
	/// 小车急停
	/// </summary>
	public bool EmergencyStop {  get; set; }
	/// <summary>
	/// 电池报警
	/// </summary>
	public bool BatteryAlarm {  get; set; }
	/// <summary>
	/// 左出轨
	/// </summary>
	public bool ChuGuiLeft {  get; set; }
	/// <summary>
	/// 右出轨
	/// </summary>
	public bool ChuGuiRight { get; set; }
	/// <summary>
	/// 弯道超时
	/// </summary>
	public bool CornersTimedOut {  get; set; }

	/// <summary>
	/// 当前喂料杯数
	/// </summary>
	public int FeedCups {  get; set; }
	/// <summary>
	/// 当前电量
	/// </summary>
	public int CurrentBattery {  get; set; }

	/// <summary>
	/// 伺服状态左上
	/// 运行状态(0-停机,1-启动)
	/// 过流状态(0-正常,1-过流)
	/// 过压状态(0-正常,1-过压)
	/// 编码状态(0-正常,1-编码器故障)
	/// 位置偏差状态(0-正常,1-偏差过大)
	/// 电源电压状态(0-正常,1-欠压)
	/// 过载状态(0-正常,1-过载)
	/// 外部控制状态(0-PC,1-外部PLC)
	/// </summary>

	public  int ServoStatus_L1 {  get; set; }
	/// <summary>
	/// 左中上
	/// </summary>
	public int ServoStatus_L2 { get; set; }
	/// <summary>
	/// 左中下
	/// </summary>
	public int ServoStatus_L3 { get; set; }
	/// <summary>
	/// 左下
	/// </summary>
	public int ServoStatus_L4 { get; set; }
	/// <summary>
	/// 右上
	/// </summary>
	public int ServoStatus_R1 { get; set; }
	/// <summary>
	/// 右中上
	/// </summary>
	public int ServoStatus_R2 { get; set; }
	/// <summary>
	/// 右中下
	/// </summary>
	public int ServoStatus_R3 { get; set; }
	/// <summary>
	/// 右下
	/// </summary>
	public int ServoStatus_R4 { get; set; }

	/// <summary>
	/// 伺服启用状态
	/// </summary>
	public  int ServoUseStatus {  get; set; }

	/// <summary>
	/// 当前二维码
	/// </summary>
	public string? BarCode {  get; set; }
	public string? FeedTotal {  get; set; }

	/// <summary>
	/// 创建时间
	/// </summary>
	public string? CreateTime { get; set; }
	public bool IsOK { get; set; }
	public bool IsCopy {  get; set; }
	/// <summary>
	/// 第几次喂料
	/// </summary>
	public int FeedNumber { get; set; }
	/// <summary>
	/// 原点检测L1,L2,L3,L4,R1,R2,R3,R4
	/// </summary>
	public string? BasePointLR {  get; set; }

	public string? TotalCupNumbers {  get; set; }
	public string? ThisCupNumber { get;set; }





}





public class AgvFeedCupModel
{
	public int L1 { get; set; }
	public int L2 { get; set; }
	public int L3 {  get; set; }
	public int L4 { get; set; }

	public int R1 {  get; set; }
	public int R2 { get; set; }
	public int R3 { get; set; }

	public int R4 { get; set; }

}